<?php
require_once("./include/appmain.php");

if($_GET['action'] == 'active'){
	$fail = false;
	$form['key'] = $_GET['key'];
	if(strlen($key) < 1){
		$fail = true;
		$events['form_show'] = true;
		$message['active_key_empty'] = true;
	}
	$result = sugm_user_activation($sugm_userprofile['user_id'] , $form['key']);
	if($result){
		$events['active_success'] = true;
	}else{
		$events['active_fail'] = true;
	}
}elseif($_GET['action'] == 'resend'){
	$result = sugm_user_activation_resend($_GET['email']);
	if($result){
		$events['resend_success'] = true;
	}else{
		$events['resend_fail'] = true;
	}
}

?>